﻿using Wizard.Runtime;

namespace Wizard.Functions
{
    public class Const<ResultType> : Function<ResultType>
    {
        private readonly ResultType mConstValue;

        public Const(ResultType value)
            : base(value.ToString(), FunctionType.@const)
        {
            mConstValue = value;
        }

        protected override ResultType RecalcValue(IRunContext context)
        {
            return mConstValue;
        }
    }
}